<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmLogModel.cpp -->
  <title>QCtmLogModel Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmLogModel</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmLogModel Class</h1>
<!-- $$$QCtmLogModel-brief -->
<p>标准日志 model. <a href="#details">More...</a></p>
<!-- @@@QCtmLogModel -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmLogModel.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qctmabstractlogmodel.html">QCtmAbstractLogModel</a></td></tr></table></div>
<ul>
<li><a href="qctmlogmodel-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#QCtmLogModel">QCtmLogModel</a></b>(const QString &amp;<i>objectName</i>, QObject *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#dtor.QCtmLogModel">~QCtmLogModel</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#errorCount">errorCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QIcon &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#errorIcon">errorIcon</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#infoCount">infoCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QIcon &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#infoIcon">infoIcon</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCtmLogData::LogInsertPolicy </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#logInsertPolicy">logInsertPolicy</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#maximumCount">maximumCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#setErrorIcon">setErrorIcon</a></b>(const QIcon &amp;<i>icon</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#setInfoIcon">setInfoIcon</a></b>(const QIcon &amp;<i>icon</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#setLogInsertPolicy">setLogInsertPolicy</a></b>(QCtmLogData::LogInsertPolicy <i>policy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#setMaximumCount">setMaximumCount</a></b>(int <i>count</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#setWarningIcon">setWarningIcon</a></b>(const QIcon &amp;<i>icon</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#warningCount">warningCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QIcon &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#warningIcon">warningIcon</a></b>() const</td></tr>
</table></div>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#clear">clear</a></b>() override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#columnCount">columnCount</a></b>(const QModelIndex &amp;<i>parent</i> = QModelIndex()) const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#data">data</a></b>(const QModelIndex &amp;<i>index</i>, int <i>role</i>) const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#headerData">headerData</a></b>(int <i>section</i>, Qt::Orientation <i>orientation</i>, int <i>role</i>) const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#rowCount">rowCount</a></b>(const QModelIndex &amp;<i>parent</i> = QModelIndex()) const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#setData">setData</a></b>(const QModelIndex &amp;<i>index</i>, const QVariant &amp;<i>value</i>, int <i>role</i>) override</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#logEvent">logEvent</a></b>(QCtmLogEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmlogmodel.html#retranslateUi">retranslateUi</a></b>() override</td></tr>
</table></div>
<!-- $$$QCtmLogModel-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmLogModel -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmLogModel[overload1]$$$QCtmLogModelconstQString&QObject* -->
<h3 class="fn" id="QCtmLogModel">QCtmLogModel::<span class="name">QCtmLogModel</span>(const <span class="type"><a href="https://doc.qt.io/qt/qstring.html">QString</a></span> &amp;<i>objectName</i>, <span class="type"><a href="https://doc.qt.io/qt/qobject.html#QObject">QObject</a></span> *<i>parent</i>)</h3>
<p>构造函数 <i>objectName</i>, <i>parent</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qobject.html#setObjectName">QObject::setObjectName</a>.</p>
<!-- @@@QCtmLogModel -->
<!-- $$$~QCtmLogModel[overload1]$$$~QCtmLogModel -->
<h3 class="fn" id="dtor.QCtmLogModel"><code>[virtual] </code>QCtmLogModel::<span class="name">~QCtmLogModel</span>()</h3>
<p>析构函数.</p>
<!-- @@@~QCtmLogModel -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><code>[override virtual] </code><span class="type">void</span> QCtmLogModel::<span class="name">clear</span>()</h3>
<p>Reimplements: <a href="qctmabstractlogmodel.html#clear">QCtmAbstractLogModel::clear</a>().</p>
<p>清除所有日志.</p>
<!-- @@@clear -->
<!-- $$$columnCount[overload1]$$$columnCountconstQModelIndex& -->
<h3 class="fn" id="columnCount"><code>[override virtual] </code><span class="type">int</span> QCtmLogModel::<span class="name">columnCount</span>(const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i> = QModelIndex()) const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#columnCount">QAbstractItemModel::columnCount(const QModelIndex &amp;parent) const</a>.</p>
<!-- @@@columnCount -->
<!-- $$$data[overload1]$$$dataconstQModelIndex&int -->
<h3 class="fn" id="data"><code>[override virtual] </code><span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> QCtmLogModel::<span class="name">data</span>(const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, <span class="type">int</span> <i>role</i>) const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#data">QAbstractItemModel::data(const QModelIndex &amp;index, int role) const</a>.</p>
<p><b>See also </b><a href="qctmlogmodel.html#setData">setData</a>().</p>
<!-- @@@data -->
<!-- $$$errorCount[overload1]$$$errorCount -->
<h3 class="fn" id="errorCount"><span class="type">int</span> QCtmLogModel::<span class="name">errorCount</span>() const</h3>
<p>返回 Error 等级日志数量.</p>
<!-- @@@errorCount -->
<!-- $$$errorIcon -->
<h3 class="fn" id="errorIcon">const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;QCtmLogModel::<span class="name">errorIcon</span>() const</h3>
<p>返回 Error 等级日志图标.</p>
<p><b>Note: </b>Getter function for property errorIcon. </p>
<p><b>See also </b><a href="qctmlogmodel.html#setErrorIcon">setErrorIcon</a>.</p>
<!-- @@@errorIcon -->
<!-- $$$headerData[overload1]$$$headerDataintQt::Orientationint -->
<h3 class="fn" id="headerData"><code>[override virtual] </code><span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> QCtmLogModel::<span class="name">headerData</span>(<span class="type">int</span> <i>section</i>, <span class="type"><a href="https://doc.qt.io/qt/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type">int</span> <i>role</i>) const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#headerData">QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const</a>.</p>
<!-- @@@headerData -->
<!-- $$$infoCount[overload1]$$$infoCount -->
<h3 class="fn" id="infoCount"><span class="type">int</span> QCtmLogModel::<span class="name">infoCount</span>() const</h3>
<p>返回 Info 等级日志数量.</p>
<!-- @@@infoCount -->
<!-- $$$infoIcon -->
<h3 class="fn" id="infoIcon">const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;QCtmLogModel::<span class="name">infoIcon</span>() const</h3>
<p>返回 Info 等级日志图标.</p>
<p><b>Note: </b>Getter function for property infoIcon. </p>
<p><b>See also </b><a href="qctmlogmodel.html#setInfoIcon">setInfoIcon</a>.</p>
<!-- @@@infoIcon -->
<!-- $$$logEvent[overload1]$$$logEventQCtmLogEvent* -->
<h3 class="fn" id="logEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmLogModel::<span class="name">logEvent</span>(<span class="type"><a href="qctmlogevent.html">QCtmLogEvent</a></span> *<i>e</i>)</h3>
<p>Reimplements: <a href="qctmabstractlogmodel.html#logEvent">QCtmAbstractLogModel::logEvent</a>(QCtmLogEvent *e).</p>
<!-- @@@logEvent -->
<!-- $$$logInsertPolicy[overload1]$$$logInsertPolicy -->
<h3 class="fn" id="logInsertPolicy"><span class="type"><a href="qctmlogdata.html#LogInsertPolicy-enum">QCtmLogData::LogInsertPolicy</a></span> QCtmLogModel::<span class="name">logInsertPolicy</span>() const</h3>
<p>返回日志插入策略.</p>
<p><b>See also </b><a href="qctmlogmodel.html#setLogInsertPolicy">setLogInsertPolicy</a>.</p>
<!-- @@@logInsertPolicy -->
<!-- $$$maximumCount[overload1]$$$maximumCount -->
<h3 class="fn" id="maximumCount"><span class="type">int</span> QCtmLogModel::<span class="name">maximumCount</span>() const</h3>
<p>返回日志最大数量.</p>
<p><b>See also </b><a href="qctmlogmodel.html#setMaximumCount">setMaximumCount</a>.</p>
<!-- @@@maximumCount -->
<!-- $$$retranslateUi[overload1]$$$retranslateUi -->
<h3 class="fn" id="retranslateUi"><code>[override virtual protected] </code><span class="type">void</span> QCtmLogModel::<span class="name">retranslateUi</span>()</h3>
<p>Reimplements: <a href="qctmabstractlogmodel.html#retranslateUi">QCtmAbstractLogModel::retranslateUi</a>().</p>
<p>重新翻译UI.</p>
<!-- @@@retranslateUi -->
<!-- $$$rowCount[overload1]$$$rowCountconstQModelIndex& -->
<h3 class="fn" id="rowCount"><code>[override virtual] </code><span class="type">int</span> QCtmLogModel::<span class="name">rowCount</span>(const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>parent</i> = QModelIndex()) const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#rowCount">QAbstractItemModel::rowCount(const QModelIndex &amp;parent) const</a>.</p>
<!-- @@@rowCount -->
<!-- $$$setData[overload1]$$$setDataconstQModelIndex&constQVariant&int -->
<h3 class="fn" id="setData"><code>[override virtual] </code><span class="type">bool</span> QCtmLogModel::<span class="name">setData</span>(const <span class="type"><a href="https://doc.qt.io/qt/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>, const <span class="type"><a href="https://doc.qt.io/qt/qvariant.html">QVariant</a></span> &amp;<i>value</i>, <span class="type">int</span> <i>role</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qabstractitemmodel.html#setData">QAbstractItemModel::setData</a>(const QModelIndex &amp;index, const QVariant &amp;value, int role).</p>
<p><b>See also </b><a href="qctmlogmodel.html#data">data</a>().</p>
<!-- @@@setData -->
<!-- $$$setErrorIcon -->
<h3 class="fn" id="setErrorIcon"><span class="type">void</span> QCtmLogModel::<span class="name">setErrorIcon</span>(const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;<i>icon</i>)</h3>
<p>设置 Error 等级日志图标 <i>icon</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmlogmodel.html#errorIcon">errorIcon</a>. </p>
<p><b>See also </b><a href="qctmlogmodel.html#errorIcon">errorIcon</a>().</p>
<!-- @@@setErrorIcon -->
<!-- $$$setInfoIcon -->
<h3 class="fn" id="setInfoIcon"><span class="type">void</span> QCtmLogModel::<span class="name">setInfoIcon</span>(const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;<i>icon</i>)</h3>
<p>设置 Info 等级日志图标 <i>icon</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmlogmodel.html#infoIcon">infoIcon</a>. </p>
<p><b>See also </b><a href="qctmlogmodel.html#infoIcon">infoIcon</a>().</p>
<!-- @@@setInfoIcon -->
<!-- $$$setLogInsertPolicy[overload1]$$$setLogInsertPolicyQCtmLogData::LogInsertPolicy -->
<h3 class="fn" id="setLogInsertPolicy"><span class="type">void</span> QCtmLogModel::<span class="name">setLogInsertPolicy</span>(<span class="type"><a href="qctmlogdata.html#LogInsertPolicy-enum">QCtmLogData::LogInsertPolicy</a></span> <i>policy</i>)</h3>
<p>设置日志插入策略 <i>policy</i>.</p>
<p><b>See also </b><a href="qctmlogmodel.html#logInsertPolicy">logInsertPolicy</a>().</p>
<!-- @@@setLogInsertPolicy -->
<!-- $$$setMaximumCount[overload1]$$$setMaximumCountint -->
<h3 class="fn" id="setMaximumCount"><span class="type">void</span> QCtmLogModel::<span class="name">setMaximumCount</span>(<span class="type">int</span> <i>count</i>)</h3>
<p>设置日志最大数量 <i>count</i>.</p>
<p><b>See also </b><a href="qctmlogmodel.html#maximumCount">maximumCount</a>().</p>
<!-- @@@setMaximumCount -->
<!-- $$$setWarningIcon -->
<h3 class="fn" id="setWarningIcon"><span class="type">void</span> QCtmLogModel::<span class="name">setWarningIcon</span>(const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;<i>icon</i>)</h3>
<p>设置 Warning 等级日志图标 <i>icon</i>.</p>
<p><b>Note: </b>Setter function for property <a href="qctmlogmodel.html#warningIcon">warningIcon</a>. </p>
<p><b>See also </b><a href="qctmlogmodel.html#warningIcon">warningIcon</a>().</p>
<!-- @@@setWarningIcon -->
<!-- $$$warningCount[overload1]$$$warningCount -->
<h3 class="fn" id="warningCount"><span class="type">int</span> QCtmLogModel::<span class="name">warningCount</span>() const</h3>
<p>返回 Warning 等级日志数量.</p>
<!-- @@@warningCount -->
<!-- $$$warningIcon -->
<h3 class="fn" id="warningIcon">const <span class="type"><a href="https://doc.qt.io/qt/qicon.html">QIcon</a></span> &amp;QCtmLogModel::<span class="name">warningIcon</span>() const</h3>
<p>返回 Warning 等级日志图标.</p>
<p><b>Note: </b>Getter function for property warningIcon. </p>
<p><b>See also </b><a href="qctmlogmodel.html#setWarningIcon">setWarningIcon</a>.</p>
<!-- @@@warningIcon -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
